
module DasLog
	PATH = "#{RAILS_ROOT}/log/"

	def log_list
		# Return all the logs that dont' start with a "."
		Dir.open(PATH).sort.select {|l| File.basename(l)[0,1] != '.' && !FileTest.directory?(PATH + l)}
	end
	
	def read_log(log)
	  File.open(PATH + log).read
	end
	
	def clear_log(log)
		open(PATH + log, "w"){|f| f = ""}
	end
	
end